package ms.maplestory.boot.world.field;


import ms.maplestory.boot.enums.PortalType;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class Portal {

    private int id;
    private PortalType pt;
    private String pn = "", tn = "", script = "";
    private int tm, x, y, horizontalImpact, verticalImpact, delay;
    private boolean onlyOnce, hideTooltip;


    public Portal(int id) {
        this.id = id;
    }

    public Portal(int id, PortalType pt, String pn, int tm, String tn, int x, int y,
                  int horizontalImpact, int verticalImpact, String script, boolean onlyOnce, boolean hideTooltip,
                  int delay) {
        this.id = id;
        this.pt = pt;
        this.pn = pn;
        this.tm = tm;
        this.tn = tn;
        this.x = x;
        this.y = y;
        this.horizontalImpact = horizontalImpact;
        this.verticalImpact = verticalImpact;
        this.script = script;
        this.onlyOnce = onlyOnce;
        this.hideTooltip = hideTooltip;
        this.delay = delay;
    }

    public Portal deepCopy() {
        Portal copy = new Portal(getId(), getPt(), getPn(), getTm(), getTn(), getX(), getY(), getHorizontalImpact(), getVerticalImpact(), getScript(), isOnlyOnce(), isHideTooltip(), getDelay());
        return copy;
    }

    @Override
    public String toString() {
        return getClass().getName() + "{" +
                "name='" + pn + '\'' +
                ", targetPortalName='" + tn + '\'' +
                ", script='" + script + '\'' +
                '}';
    }
}
